//vue配置文件
const path = require('path')

module.exports = {
    lintOnSave : false,
    //路径别名
    chainWebpack: config => {
        config.resolve.alias
            .set('@', path.join(__dirname, './src'))
    },
    css: {
        loaderOptions: {
            postcss: {
                plugins: [
                    // 设计稿宽度的1/10，一般为75
                    require('postcss-px2rem')({
                        remUnit: 37.5
                    }),
                ]
            }
        }
    },
    devServer: {
        proxy:{
            '/ajax':{
                target: 'http://m.maoyan.com',
                changeOrigin: true
            },
            '/api': {
                target: 'http://www.qinqin.com',
                changeOrigin: true,
                pathRewrite:{
                    '^api':''
                }
            }
        }
    }
}
